package com.zxd.test_junit;


import org.junit.Assert;
import org.junit.Test;

/**
 * ClassName:Test
 * Package:com.zxd.test_junit
 *
 * @Date:2023/10/7 16:31
 * @Author:zxde
 */
public class CalTest {

    Calculator calculator = new Calculator();

    @Test
    public void testAdd(){
        int actual = calculator.add(1, 23);
        int expected = 24;
        Assert.assertEquals("结果错误",expected,actual);
    }

    @Test
    public void testDiv(){
        double actual = calculator.div(1.8, 0.3);
        int expected = 6;
        Assert.assertEquals("结果错误",expected,actual);
    }
}
